package cate.game.train.equip.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "装备重铸 の 请求")
@OperationSetter(GDOperation.EQUIP_REFORGE)
public class EquipReforgeReq implements MsgInput {
    @NoteField(value = "装备ID", detail = "需要重铸的装备")
    public String equipUid;

    @NoteField(value = "英雄ID", detail = "如果是英雄身上的装备还需要传英雄id")
    public String heroUid;

    @NoteField(value = "部位ID", detail = "如果是英雄身上的装备还需传部位id")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        game.train.equip.reforgeEquip(cc.getRole(), heroUid, equipUid, pos);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.EQUIP_REFORGE_REQ;
    }
}
